package simonxianyu.learn.springmybatis.config;

import org.apache.logging.log4j.core.config.Order;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

/**
 *
 * Created by simon on 2017/2/20.
 */
@Order(500)
public class WebInit extends AbstractAnnotationConfigDispatcherServletInitializer {

  @Override
  protected Class<?>[] getRootConfigClasses() {
    return new Class<?>[]{
        RootContext.class,
        DbConfig.class, LocalSessionConfig.class};
  }

  @Override
  protected Class<?>[] getServletConfigClasses() {
    return new Class<?>[]{WebContext.class};
  }


  @Override
  protected String[] getServletMappings() {
    return new String[]{"/"};
  }

}
